﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RoadTeam.Enums;
using System.Reflection;
using System.Data;

namespace RoadTeam.SysInterface
{

    public static partial class FactoryClass
    {
        private static RoadTeam.SysInterface.ICsSort _iCsSort = null;

        public static ICsSort CreateCsSort()
        {
            if (_iCsSort == null)
            {
                string className = GlobalConfig.RtSystemPath + ".CS.CsSort_Sys";
                _iCsSort = (ICsSort)Assembly.Load(GlobalConfig.RtSystemPath).CreateInstance(className);
            }
            return _iCsSort;
        }
    }

    public interface ICsSort
    {
        bool UpdateSort(DataTable dt);

        DataTable GetSortIdentifierNotNull(String SortType);

        DataTable GetSortIdentifierNull(String SortType);

        DataTable GetSortBySortIDs(String SortType, String SortIDs);
    }
}
